Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickTime Components /
Chapter 4 - Image Compressor Components / Image Compressor Components Reference
Functions / Direct Functions


CDGetCompressedImageSize

Your component receives the CDGetCompressedImageSize request whenever an application calls the Image Compression Manager's GetCompressedImageSize function.

You can use the CDGetCompressedImageSize function when you are extracting a single image from a sequence; therefore, you don't have an image description structure and don't know the exact size of one frame. In this case, the Image Compression Manager calls the component to determine the size of the data.

pascal ComponentResult CDGetCompressedImageSize 
                              (ImageDescriptionHandle desc,
                               Ptr data, long bufferSize, 
                               DataProcRecordPtr dataProc,
                               long *dataSize);
desc
Contains a handle to the image description structure that defines the compressed image for the operation.
data
Points to the compressed image data.
bufferSize
Specifies the size of the buffer to be used by the data-loading
function specified by the dataProc parameter. If the application did not specify a data-loading function this parameter is nil.
dataProc
Points to a data-loading function structure. If the data stream is not all in memory when the application calls GetCompressedImageSize, your component may call an application function that loads more compressed data (see the chapter "Image Compression Manager" in Inside Macintosh: QuickTime for more information about data-loading functions). This parameter contains a pointer to a structure that identifies the data-loading function. If the application did not provide a data-loading function, this parameter is nil. In this case, the entire image must be in memory at the location specified by the data parameter.
dataSize
Contains a pointer to a field that is to receive the size, in bytes, of the compressed image.
DESCRIPTION
Your component returns a long integer indicating the number of bytes of data in the compressed image. You may want to store the image size somewhere in the image description structure, so that you can respond to this request quickly. See the chapter "Image Compression Manager" in Inside Macintosh: QuickTime for more information about image description structures.

Only decompressors receive this request.

RESULT CODES
noErr0No error
paramErr-50Invalid parameter specified
codecSpoolErr-8966Error loading or unloading data

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help